package teste;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;

public class Main {
	
	public void start() {
		ApplicationContext ctx = new FileSystemXmlApplicationContext( "appContext.xml");
        
        //Dependency bean1 = (Dependency)ctx.getBean("myDependency");
        //MyBean opa = (MyBean)ctx.getBean("myBean");
        IModel model = (IModel) ctx.getBean("model");
        
        System.out.println("--- Before execute() ---");
        //bean1.save("primeiro");
        //opa.execute();
        model.setId( 99 );
        model.getById( 9 );
        System.out.println("---  After execute() ---");
	}
	
    public static void main(String[] args) {
        Main app = new Main();
        app.start();
    }
}